import { NavLink } from 'react-router-dom';
import './RootFooter.scss';
export default (props: any) => {
    return (
        <div className="component-root-footer">
            <div className='footer-warp'>
                <div className='nav'>
                    {
                        props.data.map((item: any, index: number)=>{
                            return (
                                <div className='nav-menu' key={index}>
                                    <div className='menu-label'>{item.label}</div>
                                    {
                                        item.children && (
                                            <div className='menu-children'>
                                                {
                                                    item.children.map((menuItem: any, menuItemIndex: number)=>{
                                                        return <NavLink className='nav-link' to={(props.parentPath || '') + (item.path||'') + (menuItem.path||'')} key={menuItemIndex}>{menuItem.label}</NavLink>;
                                                    })
                                                }
                                            </div>
                                        )
                                    }
                                </div>
                            );
                        })
                    }
                </div>
                <div className='copy-right'>
                    <span className='company-link'>CompareGPT</span>
                    <span className='company-copy-right'>@2025 NextGen PlatformAI</span>
                </div>
            </div>
        </div>
    );
}